package com.bw.day11springbootzye1Test;

import com.bw.bean.Emp1;
import com.bw.service.Emp1Service;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;
import java.util.Map;

@SpringBootTest
@RunWith(SpringRunner.class)
public class day11springbootzye1test {
    @Autowired
    Emp1Service emp1Service;
    @Test
    public void findAll(){
        List<Emp1> all = emp1Service.findAll();
        for (Emp1 emp1 : all) {
            System.out.println(emp1);
        }
    }
    @Test
    public void TowFindAll(){
        List<Map> maps = emp1Service.TowFindAll();
        for (Map map : maps) {
            System.out.println(map);
        }
    }
    @Test
    public void FindEmpName(){
        List<Map> maps = emp1Service.FindEmpName("张晶晶");
        for (Map map : maps) {
            System.out.println(map);
        }
    }
    @Test
    public void FindLike() {
        List<Emp1> emp1s = emp1Service.FindLike("飞");
        for (Emp1 emp1 : emp1s) {
            System.out.println(emp1);
        }
    }
    @Test
    public void FindOne() {
        List<Emp1> emp1s = emp1Service.FindOne("赵刚");
        for (Emp1 emp1 : emp1s) {
            System.out.println(emp1);
        }
    }
    @Test
    public void FindLian() {
        List<Emp1> emp1s = emp1Service.FindLian("1", "财务部");
        for (Emp1 emp1 : emp1s) {
            System.out.println(emp1);
        }
    }
}
